home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mintmant / fxattr.txt < prev    next >
Text File  |  1992-03-24  |  4KB  |  130 lines

  1. Fxattr(2)                 Oct. 1, 1991                  Fxattr(2)
  2.  
  3.  
  4.  
  5. NAME
  6.      Fxattr - get extended attributes for a file
  7.  
  8. SYNOPSIS
  9.      #include <filesys.h>
  10.  
  11.      LONG Fxattr( WORD flag, char *name, XATTR *xattr );
  12.  
  13. DESCRIPTION
  14.      Fxattr gets file attributes for  the  file  named  name  and
  15.      stores  them  in  the  structure  pointed to by xattr.  This
  16.      structure is defined in the file filesys.h, and contains the
  17.      following fields of interest:
  18.  
  19.      unsigned short mode
  20.           This field gives the file type and access  permissions;
  21.           (mode  &  S_IFMT)  gives the file type (one of S_IFCHR,
  22.           S_IFDIR, S_IFREG, S_IFIFO, S_IMEM, or S_IFLNK); (mode &
  23.           ~S_IFMT)  gives  the  file access mode according to the
  24.           POSIX standard. See filesys.h for the  definitions  and
  25.           meanings of the constants.
  26.  
  27.      long index
  28.           An index for the file. Together with the  "dev"  field,
  29.           this  is  intended  to give a unique way of identifying
  30.           the file. Note, however, that not all file systems  are
  31.           able  to support this meaning, so it is best not to use
  32.           this field unless absolutely necessary.
  33.  
  34.      unsigned short dev
  35.           The device number for the file. This may be a BIOS dev-
  36.           ice  number  as passed to the Rwabs function, or it may
  37.           be a device number concocted  by  the  file  system  to
  38.           represent a remote device.
  39.  
  40.      unsigned short nlink
  41.           Number of hard links to the file. Normally  this  field
  42.           will be 1.
  43.  
  44.      unsigned short uid
  45.           The user id of the owner of the file.
  46.  
  47.      unsigned short gid
  48.           The group id of the owner of the file.
  49.  
  50.      long size
  51.           The length of the file, in bytes.
  52.  
  53.      long blksize
  54.           The size of blocks on this file system.
  55.  
  56.      long nblocks
  57.  
  58.  
  59.  
  60. Version 0.9   Last change: MiNT Programmer's Manual             1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. Fxattr(2)                 Oct. 1, 1991                  Fxattr(2)
  68.  
  69.  
  70.  
  71.           The number of physical blocks occupied by the  file  on
  72.           the disk; this count includes any blocks that have been
  73.           reserved for the file but do not yet have data in them,
  74.           and  any blocks that the file system uses internally to
  75.           keep track of file data (e.g. Unix indirect blocks).
  76.  
  77.      short mtime
  78.           The time of the last modification to the file, in stan-
  79.           dard GEMDOS format.
  80.  
  81.      short mdate
  82.           The date of the last modification, in  standard  GEMDOS
  83.           format.
  84.  
  85.      short atime, adate
  86.           The time and date of the last access to  the  file,  in
  87.           GEMDOS  format.  Filesystems that do not keep this time
  88.           will return the values given in "mtime" and "mdate" for
  89.           these fields as well.
  90.  
  91.      short ctime, cdate
  92.           The time and date of the  file's  creation,  in  GEMDOS
  93.           format.   Filesystems  that  do not keep this time will
  94.           return the values given  in  "mtime"  and  "mdate"  for
  95.           these fields as well.
  96.  
  97.      short attr
  98.           The standard TOS attributes for the file,  as  returned
  99.           by Fattrib and/or Fsfirst.
  100.  
  101.      The flag parameter controls whether or  not  symbolic  links
  102.      should be followed. If it is 0, then symbolic links are fol-
  103.      lowed (like the Unix stat function).  If  flag  is  1,  then
  104.      links  are  not followed and the information returned is for
  105.      the symbolic link itself (if the named file  is  a  symbolic
  106.      link);  this  behavior is like that of the Unix lstat system
  107.      call.
  108.  
  109. RETURNS
  110.      0 on success
  111.  
  112.      EFILNF if the file is not found
  113.  
  114.      EPTHNF if the path to the file is not found.
  115.  
  116. SEE ALSO
  117.      Fattrib(2), Fsnext(2)
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. Version 0.9   Last change: MiNT Programmer's Manual             2
  127.  
  128.  
  129.  
  130.